class OuterClass2 {
    public int data1 = 1;
    int data2 = 2;
    public static int data3 = 3;
    public void test() {
        System.out.println("out::test()");
    }

    /*
        1.如何获取静态内部类对象？直接new，不需要先实例化外部类
        OuterClass2.InnerClass2 innerClass2 = new OuterClass2.InnerClass2();
        2.静态内部类中，不能访问外部类的非静态成员，需要通过外部类的对象的引用才能访问
     */
    static class InnerClass2 {
        public int data4 = 4;
        int data5 = 5;
        public static int data6 = 6;

        public void func() {
            System.out.println("out::func()");
            OuterClass2 outerClass = new OuterClass2();
            System.out.println(outerClass.data1);
        }


    }
}

class Person {
    private int age;


}
public class Test {
    public static void main(String[] args) {
        OuterClass2.InnerClass2 innerClass2 = new OuterClass2.InnerClass2();
    }
}